<template>
  <div class="home">
    <Row class="Content">
      <Col span="12" class="con_header" :class="chong">
        <div @click="navigation('chong')" class="child">
          充值
        </div>
      </Col>
      <Col span="12" class="con_header" :class="tixian">
        <div @click="navigation('tixian')" class="child">
          提现
        </div>
      </Col>
    </Row>

    <div class="body_mingxi">
      <!--               充值                            -->
      <ul v-for="times in Capitalarray" v-if="chong == 'state'" :style="{height:times.updated_at}"
          @click="conte(times)">
        <li class="fore">
          <img :src="times.id" alt="">
        </li>
        <li class="one">
          <div class="t_nmae font_linehe">
            <span>{{statu(times)}}</span>
          </div>
        </li>
        <li class="three">
          <div class="t_money_c">+{{times.money}}</div>
        </li>
        <div class="dla_" v-if="times.updated_at == '200px'">
          <div>
            <span class="name_">订单号:</span> <span class="rig">{{times.out_trade_no}}</span>
          </div>
          <div>
            <span class="name_">手续费:</span> <span class="rig"> - {{ (times.remark == "线下支付" ? 0 : times.remark) | toFix }}</span>
          </div>
          <div>
            <span class="name_">充值时间：</span> <span class="rig">{{times.created_at}}</span>
          </div>
        </div>
      </ul>


      <!--                   提现                            -->
      <ul v-for="times in Capitalarray">
        <li class="fore">
          <img :src="times.id" alt="">
        </li>
        <li class="one">
          <div class="t_nmae tixian_leb">
            <span>{{ordertype(times)}}</span>
            <div class="time_">{{times.created_at}}</div>
            <!--<span class="fonys_">{{statusa(times.status)}}</span>-->
          </div>
          <!--<div class="t_time">{{times.created_at}}</div>-->
        </li>
        <li class="three">
          <div class="t_money">-{{times.money}}</div>
        </li>

      </ul>

    </div>

  </div>
</template>
<script>
  import weixin from '~/wx.png'
  import ali1 from '~/ali2.png'
  import chongz1 from '~/chongz1.png'
  import chongz2 from '~/recharge.png'

  export default {
    components: {
      weixin,
      ali1,
      chongz1,
      chongz2
    },
    props: {
      Capitalarray: {
        type: Array,
        default() {
          return []
        }
      }
    },
    data() {
      return {
        chong: 'state',
        tixian: '',
      }
    },
    methods: {

      navigation(e) {
        switch (e) {
          case 'chong':
            this.chong = 'state';
            this.tixian = '';
            break;
          case 'tixian':
            this.chong = '';
            this.tixian = 'state';
            break;
        }
      },
      conte(e) {  //点击事件
        if (e.updated_at == '200px') {
          e.updated_at = '80px';
          this.body_cs = false;
        } else {
          e.updated_at = '200px';
          this.body_cs = true;
        }
      },
      statu(e) {  //渲染图片
        switch (e.type) {
          case 'wx':
            e.id = weixin;
            return '微信充值';
            break;
          case 'ali':
            e.id = ali1;
            return '支付宝充值';
            break;
          case '3':
            e.id = chongz2;
            return '线下充值';
            break;
        }
      },
      ordertype(e) {  //提现图片
//(1微信 2支付宝 3网银 4其他
        switch (e.type) {
          case 'wx':
            e.id = weixin;
            return "微信提现";
            break;
          case 'th':
            e.id = chongz1;
            return "银行卡提现";
            break;
        }
      },
    },
    watch: {},
    computed: {
      //计算属性
    },
    created() {

    },
    mounted() {
    }
  }
</script>
<style scoped>
  .home {
    width: 100%;
    height: 100%;
    background: #f7f7f7;
  }

  .Content {
    width: 100%;
    height: 45px;
    background: white;
  }

  .name_ {
    color: #535353;
  }

  .con_header {
    height: 100%;
    text-align: center;
    line-height: 45px;
  }

  .font_linehe {
    line-height: 80px;
  }

  .state {
    border-bottom: 1px solid #26a2ff;
    color: #26a2ff;
  }

  .child {
    width: 100%;
    height: 100%;
  }

  .tixian_leb {
    margin-top: 9%;
    line-height: 30px;
  }

  .body_mingxi {
    width: 100%;
    height: 100%;
    background: white;
    color: #657180;
  }

  ul {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 90%;
    margin: auto;
    border-bottom: 1px solid #eeeeee;
    height: 80px;
  }

  ul li {

    height: 80px;
    float: left;
  }

  .dla_ {
    width: 85%;
    height: 120px;
    float: right;
    font-size: 12px !important;
    color: #657180;
  }

  .dla_ div {
    width: 100%;
    height: 35px;
    line-height: 35px;
    display: flex;
  }

  .dla_ div span {
    display: block;
    float: left;
    width: 50%;
    height: 100%;
  }

  .rig {
    text-align: right;
    overflow: hidden;
  }

  .one {
    width: 65%;
  }

  .three {
    width: 20%;
  }

  .fore {
    width: 15%;
  }

  .fore img {
    width: 40px;
    margin-top: calc(100% - 60%);
    height: 40px;
    display: block;
    background-size: 100%;
  }

  .t_nmae {
    width: 100%;
    height: 100%;
    font-size: 14px;
    color: #657180;
    text-indent: 14px;
  }

  .time_ {
    width: 100%;
    height: 30px;
    font-size: 12px;
    color: #9ea7b4;
  }

  .t_time {
    width: 100%;
    height: 30px;
    font-size: 0.7rem;
    color: #494949;
  }

  .t_money_c {
    width: 100%;
    height: 100%;
    line-height: 80px;
    text-align: right;
    font-size: 14px;
    color: #657180;
  }

  .t_money {
    width: 100%;
    height: 100%;
    line-height: 80px;
    text-align: right;
    font-size: 14px;
  }

  .t_nmae span {
    width: 50%;
    height: 100%;
  }

  .fonys_ {
    font-size: 0.9rem;
    margin-left: 30%;
  }

  .fonys_a {
    font-size: 0.9rem;
  }
</style>
